package com.rede.didiok.pay;

import java.util.TimeZone;

import javax.annotation.PostConstruct;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
@EnableDiscoveryClient
@EnableCaching
@EnableScheduling
@EnableTransactionManagement
@EnableFeignClients(basePackages = {"com.rede.didiok.common.feign"})
@ComponentScan(basePackages = {
//        "com.plumelog",
		"com.rede.didiok.common.annotion",
		"com.rede.didiok.common.config.feign",
		"com.rede.didiok.common.handler",
		"com.rede.didiok.common.config.redis",
		"com.rede.didiok.common.utils",
		"com.rede.didiok.pay"})
public class DidiokPayApplication {

	public static void main(String[] args) {
		TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai"));
		SpringApplication.run(DidiokPayApplication.class, args);
	}

	/**
	 * AliPayService
	 * 设置时区
	 */
	@PostConstruct
	void setDefaultTimezone() {
		TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai"));
	}
}
